package com.stylefeng.guns.modular.system.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.stylefeng.guns.core.validater.Insert;
import com.stylefeng.guns.core.validater.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 机构分类功能权限表
 * </p>
 *
 * @author stylefeng
 * @since 2018-09-12
 */
@Data
@TableName("sys_orgcategory_function")
@ApiModel(value = "机构分类功能权限",description = "机构分类功能权限")
public class OrgcategoryFunction extends Model<OrgcategoryFunction> {

    private static final long serialVersionUID = 1L;

    public Integer getSofId() {
        return sofId;
    }

    public void setSofId(Integer sofId) {
        this.sofId = sofId;
    }

    @TableId(value = "sof_id",type= IdType.AUTO)
    @NotNull(message = "编号不能为空",groups = {Update.class})
    private Integer sofId;



    @TableField("sp_function_id")
    @NotNull(message = "功能编号不能为空",groups = {Insert.class,Update.class})
    private Integer spFunctionId;
    /**
     * 机构分类ID
     */
    @TableField("soc_id")
    @NotNull(message = "机构分类ID不能为空",groups = {Insert.class})
    private String socId;
    
    /***
     * 操作权限
     */
    @TableField("sp_method")
    @ApiModelProperty(name = "spMethod",value = "操作权限",hidden = true)
    private String spMethod;
   
    /**
     * 创建人
     */
    @TableField("create_user")
    private String createUser;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 修改人
     */
    @TableField("update_user")
    private String updateUser;
    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    
    
 
    @Override
    protected Serializable pkVal() {
        return this.sofId;
    }

    @TableField(exist = false)
    private String objArrys;

    public String getObjArrys() {
        return objArrys;
    }

    public void setObjArrys(String objArrys) {
        this.objArrys = objArrys;
    }

    @TableField(exist = false)
    private String spFunctionName;//扩展参数 功能名
    @TableField(exist = false)
    private String spFunctionPid;//扩展参数 功能父亲ID

    @TableField(exist = false)
    private String sfIsmenu;//扩展参数 菜单类型

}
